package com.yykj.prescription.server.controller;

import com.yykj.common.vo.ResultVO;
import com.yykj.prescription.client.dto.PrescriptionOrderCheckResultDTO;
import com.yykj.prescription.server.service.PrescriptionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/prescription/client")
public class ProtoPrescriptionController {
    @GetMapping("/order/check/{prescriptionId}")
    @ApiOperation("处方下单检查")
    public ResultVO<PrescriptionOrderCheckResultDTO> checkPrescriptionOrder(@PathVariable String prescriptionId) {
        return ResultVO.success(prescriptionService.checkPrescriptionOrder(prescriptionId));
    }
    private PrescriptionService prescriptionService;

    @Autowired
    public void setPrescriptionService(PrescriptionService prescriptionService) {
        this.prescriptionService = prescriptionService;
    }
}
